<div class="layui-form-item">
	<label class="layui-form-label">名称</label>
	<div class="layui-input-inline">
		<input type="text" id="name" placeholder="名称" autocomplete="off" class="layui-input">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">url</label>
	<div class="layui-input-inline">
		<input type="text" id="url" placeholder="url" autocomplete="off" class="layui-input">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">排序</label>
	<div class="layui-input-inline">
		<input type="text" id="order_id" placeholder="排序" autocomplete="off" class="layui-input">
	</div>
</div>
<button onclick="upload_action()" class="layui-btn layui-btn-normal">添加</button>
<script>
	function upload_action()
	{
		var data = {};
		var id = $("#hidden_id").val();
		var name = $("#name").val();
		var url = $("#url").val();
		var order_id = $("#order_id").val();
		data = {id:id,name:name,url:url,order_id:order_id};
		$.post('/setting/action_add',data,function(res){
			if(res.code==1)
			{
				layer.confirm('添加成功',{},function(){
					window.location.reload();
				})
			}
			else
			{
				layer.alert(res.msg);
			}
		},'json')

	}
</script>